package cn.wjh.business.domain;

import com.ruoyi.common.utils.StringUtils;
import lombok.Data;

@Data
public class KeyValue {
	private String label;
	private Object key;
	private Object value;

	public KeyValue(Competition competition) {
		this.key = competition.getCompetitionId();
		this.label = competition.getTitle();
		/*/competitionDetail/5?judgeIds=100,101*/
		this.value = StringUtils.format("/competitionDetail/{}?judgeIds={}",
				competition.getCompetitionId(),
				StringUtils.join(competition.getJudgeIds(), ','));
	}

}
